package com.aaa.service.front.Impl;

import com.aaa.entity.FrontUserinfo;
import com.aaa.mapper.front.FrontUserinfoMapper;
import com.aaa.service.front.IFrontUserinfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class FrontUserinfoServiceImpl implements IFrontUserinfoService{

    @Resource
    private FrontUserinfoMapper fu;


    @Override
    public int insertByUser(FrontUserinfo frontUserinfo) {
        return fu.doAddByUser(frontUserinfo);
    }

    @Override
    public boolean isNameExists(String frontUserEmail) {
        return fu.findByEmail(frontUserEmail).size()>0;
    }

    @Override
    public FrontUserinfo login(String frontUserEmail, String frontUserPwd) {
        return fu.login(frontUserEmail,frontUserPwd);
    }

    @Override
    public FrontUserinfo findByUserInfoId(Integer UserInfoId) {
        return fu.findByUserInfoId(UserInfoId);
    }

    @Override
    public int update(FrontUserinfo frontUserinfo) {
        return fu.doUpdate(frontUserinfo);
    }


}
